Page({
  data: {
    repairsList: [], //维修列表
  },
  onLoad() {
    this.getRepairsList()
  },
  // 获取维修列表
  async getRepairsList() {
    const res = await wx.http.get('/repair')
    this.setData({
      repairsList: res.data.rows,
    })
  },
  goDetail(e) {
    wx.navigateTo({
      url: `/repair_pkg/pages/detail/index?id=${e.mark.id}`,
    })
  },

  addRepair() {
    wx.navigateTo({
      url: '/repair_pkg/pages/form/index',
    })
  },
})
